import 'package:flutter/material.dart';

class ComTransition extends StatefulWidget {
  final Widget child;

  const ComTransition({super.key, required this.child});

  @override
  State<ComTransition> createState() => _ComTransitionState();
}

class _ComTransitionState extends State<ComTransition>
    with SingleTickerProviderStateMixin {
  late AnimationController _controller;

  @override
  void initState() {
    super.initState();
    _controller = AnimationController(vsync: this);
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  void didChangeDependencies() {
    print("依赖变化");
    super.didChangeDependencies();
  }

  @override
  Widget build(BuildContext context) {
    return widget.child;
  }
}
